Optical device having a triangular shape and made of glass or quartz; used to deviate a beam or invert an image